from typing import Optional
from pydantic import BaseModel, Field
from .base import BaseSchema

class DroneTypeBase(BaseSchema):
    """无人机类型基础模型"""
    name: str = Field(..., max_length=100, description="类型名称")
    description: Optional[str] = Field(None, max_length=255, description="类型描述")
    max_speed: Optional[float] = Field(None, description="最大速度")
    max_payload: Optional[float] = Field(None, description="最大载荷")
    max_flight_time: Optional[int] = Field(None, description="最大飞行时间（分钟）")

class DroneTypeCreate(DroneTypeBase):
    """创建无人机类型模型"""
    pass

class DroneTypeUpdate(DroneTypeBase):
    """更新无人机类型模型"""
    pass

class DroneTypeSchema(DroneTypeBase):
    """无人机类型响应模型"""
    pass